\fs28 This is a program for plotting curves in two dimensions, with data from one or more files. Each data file should be an ASCII (ordinary text) file or a compressed file (see below under "Open") or a binary file (see below under "Open binary"). For ASCII or compressed files, each line of a data file should contain an x-value followed by the corresponding y values for each of the curves. So, each line should have the form\
x y1 y2 ... yn\
where y1,...,yn are the y values for the given value of x. There can be an arbitrary number of curves and there is no limit on the total number of points. Commas as well as text material are allowed in the input file, but periods and numerals in text are not allowed. (This allows you to "annotate" your input file, but note well that annotations cannot contain numerals or periods. Also note that annotations should come after the first line of the file.) If the single character "!" is found on a line, everything on that line following the "!" is ignored. An input file can begin with one or more lines that start with "!". There is one\
other form of input file that is allowed: if you have only one column of data in\
your input file, it is assumed to be y values, and the x values are assumed to\
be the integers 1,2,3,... For binary files, see the section on "Open binary" below.\
For files with associated "error bars", see the section on "Error bars" below.\
The interface tries to conform to the standard NeXT "look and feel" and should be easy to use. Menus and panels are used to control the plot's appearance. You can control min/max, axis labels, plot title, and legends for each curve. You can also control placement of the legend box and titles. Various switches are available to control the plot style and font styles of various labels and text. You can select various line styles, symbol styles, and symbol sizes for each curve. The print facility is fully operational and automatically expands the output to 8.5 in. x 11 in. page size in either landscape or portrait modes.\
There are a number of functions available from the pull-down menus or through the command-key equivalent:\
Help...-- This help\
Preferences... -- See below.\
Open -- Open file. If this is the start of a new plot the curves are read in and \
plotted. If a set of curves have already been plotted, a new file is opened \
and added to the existing plot. There is no limit to the number of files \
or total number of curves. If the file name ends in ".Z" it will be assumed\
that the file has been compressed with the Unix "compress" utility. The\
min/max will not be reset.\
If nxyplot is already running, you can also open a file or several files\
by dragging the icon of the file or group of files from the Workspace\
Manager onto the icon of nxyplot.\
New -- Clear plot and open new file. The current plot is cleared, including\
all panels. A new file is opened and plotted. All the line styles, symbol \
styles and legend information is reset. Font information is not reset.\
Remove all -- Clears plot. The current plot is cleared, including all the \
panels. New files can be read in and plotted.\
Remove some -- A list of the files currently being plotted is displayed. Click\
the ones you want to delete.\
Save EPS -- Save Encapsulated PostScript. You will be prompted for a file into\
which Encapsulated PostScript code describing the plot will be\
written. This file can be imported into other applications.\
Write format -- Write a format file containing information on the min/max, fonts\
selected, line and symbol styles, etc. This produces a template which\
makes it easy to plot another set of curves with the same min/max,\
fonts, line and symbol styles, etc.\
Read format -- Read a format file. This presumes you have previously written\
a format file and are now plotting another set of points.\
Open binary -- Open a binary data file. The format for these files is a little\
different than for formatted files. A binary data file is assumed to contain\
first all the x values, then all the y values for the first curve, then all\
the y values for the second curve, etc. In this case you must tell the\
program (space is provided on the open panel) how many curves are\
in the file and whether or not there is x data in the file. For very large\
files, reading binary data can be significantly faster than reading\
formatted data.\
Write data -- For each data file read in, write out that data. This can be useful\
if some of your data is from a pasteboard. If you don't want to write\
out a particular file, just press the "Cancel" button. An option is provided\
to write out binary data.\
Edit -- Allows cutting and pasting in the various text fields. The "Copy Graphics"\
menu item copies the current plot to the pasteboard. You can then\
paste it into other applications with the standard "paste" command.\
Font Panel... -- Bring up a font panel. The font panel controls font styles \
and sizes for the titles, labels and legend text. You need to select\
the appropriate panel item to select the target of the font change. \
These can be selected individually or in groups for the targeted action.\
Deselecting maintains the previous choice.\
Lines -- Bring up line style panel.\
Symbols -- Bring up symbol style panel.\
Legends -- Bring up legend panel.\
Error bars -- Bring up error bar panel. If you want to read in a file with data\
and associated error bounds, use the pop-up list on this panel. There\
are three possibilities:\
If the y values have error bounds and the x values don't, each line\
of the file should look like\
x y1 e1 y2 e2 ...\
If the x values have error bounds and the y values don't, each line\
of the file should look like\
x e y1 y2 y3 ...\
If both the x and y values have error bounds, each line of the file\
should look like\
x e y1 e1 y2 e2 ...\
No checking is done to ensure that the errors have reasonable values. \
Binary files are OK; the format in this case is all x's, then all x errors\
(if the x values have error bounds), then all y's for the first curve,\
then all e's for the first curve (if the y values have error bounds),\
all y's for the second curve, all e's for the second curve, etc. You can\
do some adjusting of the error bars with the other controls on this panel.\
Be sure the pop-up list agrees with the file you want to read (x or y\
error bars or not), otherwise you will get strange-looking plots.\
Color -- Has two items on its submenu, "Colors..." and "Color Panel". Choosing\
"Colors..." brings up the NeXT color panel which provides a standard\
method for choosing colors. Choosing "Color Panel" brings up a panel\
which allows you to grab colors from the NeXT color panel and "drop"\
them into color wells which control the colors of the background, text,\
and curves. Alternatively, you can highlight one or more color wells\
by clicking on their borders; then any color you select in the color panel\
will immediately be transferred to the active color well or wells. Click the\
"Plot" button to refresh the plot and see the new colors.\
Print... -- Brings up the standard NeXT Print panel, with two additional buttons.\
The left button allows you to print in black and white even if you are\
viewing the curves in color. The right button toggles between "Line\
Styles as Shown" and "Cycle Line Styles'; the latter option causes the\
curves to be printed with line styles that cycle through the various\
possibilities. Again, this may be useful if you are viewing the curves in\
different colors but are printing in black and white. These buttons are\
initialized based on your settings in the Preferences panel.\
Services -- Allow you to use the services of other applications.\
Hide -- hide.\
Quit -- quit (no warning is given).\
Notes:\
The "Fine tuning" button on the control panel brings up an auxiliary panel with controls for tic marks, axes, grid, border box (the "outer" box, surrounding everything), and frame box (the "inner" box, surrounding the data).\
Thicknesses and lengths are controlled by slider/text field pairs. Positive tic mark lengths correspond to tic marks pointing away from the plotting area and negative numbers correspond to tic marks pointing into the plotting area. Major and minor tic marks can be enabled or disabled. Tic marks can be placed on the axes, on the left and bottom sides of the frame box, or on all four sides of the frame box.\
The "Previous View" button is useful if you make an error in zooming and wish to recover.\
The "Select Column" button on the Control Panel brings up a panel which allows you to change the column of data in your file which is taken to be the x-data. Just click on the appropriate button. If several files have been read in, not all with the same number of y-curves, the rows corresponding to different files will have different numbers of visible buttons. It is a known BUG that if this window is resized, all the buttons become visible for a while, even if clicking on some of them would be meaningless. This only momentarily affects the appearance of the panel, not its functionality. In a few seconds the disabled buttons will become invisible again. \
The "Hand format" button brings up a panel which allows you to explicitly control formatting of the numerical labels along the axes. Instructions are on the panel.\
The "Preview" switch is intended to show what will be printed if you print\
a given plot. It chooses colors and line styles based on the setting of the\
auxiliary buttons on the print panel.\
Some actions such as zooming and moving the legend or titles automatically refresh the plot. Other actions such as changing font styles or entering new labels or legend text require forcing a refresh by clicking the plot button.\
Any curve which has both its symbol and its linestyle set to none will be ignored in the calculation of min/max. Thus if you want to temporarily ignore some curves, set their symbols and linestyles both to none, then click on the "Reset min/max" button. If all the curves for a given data file have their symbols and linestyles set to none, the x-data for the file will also be ignored in any min/max calculation.\
\
Preferences... -- You can set your color preference with the black/white vs. color button. You can also register nxyplot as a service provider. If the "plot with nxyplot" button is checked, other applications will be able to export data on a pasteboard to nxyplot and have it plotted. To enable the service, the nxyplot application should be placed in a directory on your path (like ~/Apps, or one of the standard system Apps directories). Make sure the service is enabled, then log out and log back in. The services menu item of other applications (such as Edit or Terminal) should now have an entry "plot with nxyplot". To use the service, copy some data onto a pasteboard in an application that has the "plot with nxyplot" item in its services menu. Select the "plot with nxyplot" menu item; nxyplot should start up and produce a plot. You can adjust min/max, line style, etc., as usual. To disable services providing, make sure the button is not checked, then log out and log back in.\
The "print options" on the Preferences panel allow you to specify whether\
or not you have a color printer, and whether or not to print the line styles as\
shown on the screen. See the preceding explanation of the "Print" item.\
The "background" option on the Preferences panel, if chosen as "transparent",\
will arrange that when a plot is saved as PostScript or copied to the pasteboard,\
the background of the plot is transparent. Thus you can take the resulting\
graphic and, in some appropriate drawing program, put plots arbitrarily close\
together or overlay plots.\
If a file has a name ending in ".dat", ".xyp", or ".nxyplot", then nxyplot can be automatically launched by double-clicking on that file in the Workspace manager. For this to work, nxyplot must be installed in one of the "standard" places, like your Apps directory. When you log in, the Workspace Manager should recognize nxyplot as a candidate to open any file with one of the three recognized extensions. To check this, select a file with one of those extensions in the Workspace Manager; choose the Tools menu item and the Inspector submenu item. In the panel that appears, choose Tools from the pop-up list. The nxyplot icon should appear; if it is not highlighted, click on it to highlight it.\
The program may be launched from a command line in a shell or terminal window. The syntax is:\
This reads in an arbitrary number of input files (no binary files, though).\
The options are:\
-f: Read in the format file formatfile.\
-o: Produce an EPS file epsfile.\
-q: Quit immediately after plotting.\
-h: Produce a terse help message and quit.\
This capability may be useful if you have a fixed format file and a lot of slightly different data files to plot.\
\
Acknowledgments:\
This program is based on one called "xyplot" written for SGI workstations by Marshal Merriam and Krysten Nguyen at NASA/Ames Research Center. We have used some ideas from the NeXT program "QuickPlot" by
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0 Fred Richards
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 of the
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0 Dept. of Physics
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0 University of Illinois
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 . We borrowed from the AtYourService example of Henry Krempel for the code to make nxyplot a service provider. Paul Howell pointed us to the ScrollWindow class of David Joerg and also wrote some code to incorporate this class into our application. Ralph Zazula showed us how to get the Workspace Manager to recognize some filename extensions as belonging to nxyplot. Derek Lisoski suggested the\
We use this program ourselves, and we intend to support it (in our spare time). We cheerfully accept all bug reports and suggestions for improvements or enhancements. We always have several items on our wish list.\
Finally, remember this is freeware and is intended for free dissemination.\
We do not accept any responsibility for its use, modification, or abuse. As with all free software, this is not guaranteed to be worth any more than what you paid for it.
NXCursor
NXibeam
Scroller
_doScroller:
@@@ffs
ScrollingText
FormatHandlerInstance
FormatHandler
Preferences
nxyplot Preferences
plot with nxyplot
Enable/Disable Service
Black/White
Screen
Line Styles as Shown
Cycle Line Styles
Print Options
Background
ServicesHandlerInstance
ServicesHandler
PlotDelegate
Colors
Colors in nxyplot
NXColorWell
Background color
Curve colors
Curve no.
Text color
ColorWell
NXColorWell1
Column Selection
For each file, select the column of data to be used for the x-axis. (Click the Reset min/max button on the control panel to replot).
Update
File Name
Column
filename
Title
Matrix2
ColumnSelectionHandlerInstance
ColumnSelectionHandler
Hand Formatting
For either axis, enable manual formatting, then enter number of characters (including sign) to the left of the decimal point, number of characters to the right of the decimal point (including the decimal point), and number of characters in the exponent (if any).